package com.net.xpay.common.manager.stat;

import com.net.common.manager.DomainManager;
import com.net.xpay.common.domain.stat.UserDailyStat;
import com.net.xpay.common.model.AggMonthUserDailyStatModel;
import com.net.xpay.common.model.AggOperatorUserDailyStatModel;
import com.net.xpay.common.model.AggUserDailyStatModel;
import com.net.xpay.common.model.search.OperatorUsersSearchModel;
import com.net.xpay.core.dto.SafePayBookAccountCountDto;
import com.net.xpay.core.model.UserDailyStatSearchModel;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;


public interface UserDailyStatManager extends DomainManager<Long,UserDailyStat> {
    UserDailyStat findByDayAndUserId(LocalDate day, Long userId);

    List<AggUserDailyStatModel> aggSearch(UserDailyStatSearchModel searchModel);

    long aggSearchCount(UserDailyStatSearchModel searchModel);

    List<AggUserDailyStatModel> daySearch(LocalDate yesterday,LocalDate dayBefore );

    List<AggMonthUserDailyStatModel> listByData(Integer year, Integer month);

    AggMonthUserDailyStatModel sumByUserIdAndData(Long userId, Integer year, Integer month);

    AggOperatorUserDailyStatModel sumByUserIdAndSearchModel(Long userId,OperatorUsersSearchModel searchModel);

    List<UserDailyStat> listByDay(LocalDate day);

    SafePayBookAccountCountDto sumMonthAmount(LocalDateTime startMonthTime, LocalDateTime startTime, Long id);
}
